package com.atguigu.client;

import com.atguigu.entity.PaymentInfo;
import com.atguigu.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "shop-payment")
public interface PaymentFeignClient {
    //3.发起退款接口
    @RequestMapping("/payment/refund/{orderId}")
    public RetVal refund(@PathVariable Long orderId);
    //4.查询支付宝中是否有交易记录
    @RequestMapping("/payment/queryAlipayTrade/{orderId}")
    public boolean queryAlipayTrade(@PathVariable Long orderId);
    //5.关闭交易
    @RequestMapping("/payment/closeAlipayTrade/{orderId}")
    public RetVal closeAlipayTrade(@PathVariable Long orderId);
    @GetMapping("/payment/getPaymentInfo/{outTradeNo}")
    public PaymentInfo getPaymentInfo(@PathVariable String outTradeNo);
}
